package com.brillilab.service.module.message.template.impl.space;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: PlaneModifyToPrivateTemp
 * @ProjectName brill_lab
 * @Description: 平面被修改为个人私有成功后
 * @date 2019/5/27 16:25
 */
@Data
public class PlaneModifyToPrivateTemp extends AbstractMessageTemplate {

    private String labName;
    private Integer deviceNo;
    private String planeNo;
    private String operator;

    /**
     * 平面被修改为个人私有成功后
     * @param labId         实验ID
     * @param receiverId    接收人ID
     * @param labMemberId   接收者实验室成员Id
     * @param labName       实验室名称
     * @param deviceNo      设备编号
     * @param planeNo       平面序号
     * @param operator      操作人
     */
    public PlaneModifyToPrivateTemp(Long labId, Long receiverId,Long labMemberId,String labName, Integer deviceNo, String planeNo, String operator) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.PlaneModifyToPrivate.getValue());
        super.setTitle("平面已设置为您私有");
        String content = String.format("<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>设备内的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>平面已被</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>设置为您私有，</span>" +
                        "<span>如有疑问请联系实验室管理员</span>",
                labName, deviceNo, planeNo,operator);
        super.setContent(content);
        super.setAppContent(String.format("%s的%s设备内的%s平面已被%s设置为您私有，如有疑问请联系实验室管理员",labName, deviceNo, planeNo,operator));
        this.labMemberId=labMemberId;
        this.labName = labName;
        this.deviceNo = deviceNo;
        this.planeNo = planeNo;
        this.operator = operator;
    }

}
